These are the Zip and Unzip options to be used in the BW Zip Compress OCX
The sample application distributed with the OCX already have the most used commands inside it
Notice that not all the arguments can be used in the OCX , but you is welcome to test all
Zip and Unzip Options
These are the options to be passed to the Zip and Unzip functions using the Options argument , these arguments derived from the zip.exe and unzip.exe files by Infozip.
ZIP OPTIONS
-A Adjust self-extracting executable archive. A self-
extracting executable archive is created by
prepending the SFX stub to an existing archive. The
-A option tells zip to adjust the entry offsets
stored in the archive to take into account this
"preamble" data.
-b path
Use the specified path for the temporary archive. For example:
-b /tmp stuff *
will put the temporary zip archive in the directory
/tmp, copying over stuff.zip to the current direc-
tory when done. This option is only useful when
updating an existing archive, and the file system
containing this old archive does not have enough
space to hold both old and new archives at the same
time.
-c Add one-line comments for each file. File opera-
tions (adding, updating) are done first, and the
user is then prompted for a one-line comment for
each file. Enter the comment followed by return,
or just return for no comment.
-d Remove (delete) entries from a zip archive. For
example:
-d foo foo/tom/junk foo/harry/\* \*.o
will remove the entry foo/tom/junk, all of the
files that start with foo/harry/, and all of the
files that end with .o (in any path). Note that
shell pathname expansion has been inhibited with
backslashes, so that zip can see the asterisks,
enabling zip to match on the contents of the zip
archive instead of the contents of the current
directory.
Under MSDOS, -d is case sensitive when it matches
names in the zip archive. This requires that file
names be entered in upper case if they were zipped
by PKZIP on an MSDOS system.
-D Do not create entries in the zip archive for direc-
tories. Directory entries are created by default
so that their attributes can be saved in the zip
archive.
-e Encrypt the contents of the zip archive using a
password which is entered on the terminal in
response to a prompt (this will not be echoed; if
standard error is not a tty, zip will exit with an
error). The password prompt is repeated to save
the user from typing errors.
-f Replace (freshen) an existing entry in the zip
archive only if it has been modified more recently
than the version already in the zip archive; unlike
the update option (-u) this will not add files that
are not already in the zip archive. For example:
-f foo
This command should be run from the same directory
from which the original zip command was run, since
paths stored in zip archives are always relative.
Note that the timezone environment variable TZ
order for the -f , -u and -o options to work cor-
rectly.
The reasons behind this are somewhat subtle but
have to do with the differences between the Unix-
format file times (always in GMT) and most of the
other operating systems (always local time) and the
necessity to compare the two. A typical TZ value
is ``MET-1MEST'' (Middle European time with auto-
matic adjustment for ``summertime'' or Daylight
Savings Time).
-F Fix the zip archive. This option can be used if
some portions of the archive are missing. It is not
guaranteed to work, so you MUST make a backup of
the original archive first.
When doubled as in -FF the compressed sizes given
inside the damaged archive are not trusted and zip
scans for special signatures to identify the limits
between the archive members. The single -F is more
reliable if the archive is not too much damaged,
for example if it has only been truncated, so try
this option first.
Neither option will recover archives that have been
incorrectly transferred in ascii mode instead of
binary. After the repair, the -t option of unzip
may show that some files have a bad CRC. Such files
cannot be recovered; you can remove them from the
archive using the -d option of zip.
-g Grow (append to) the specified zip archive, instead
of creating a new one. If this operation fails, zip
attempts to restore the archive to its original
state. If the restoration fails, the archive might
become corrupted. This option is ignored when
there's no existing archive or when at least one
archive member must be updated or deleted.
-h Display the zip help information (this also appears
if zip is run with no arguments).
-i files
Include only the specified files, as in:
-r foo . -i \*.c
which will include only the files that end in .c in
the current directory and its subdirectories. (Note
for PKZIP users: the equivalent command is
pkzip -rP foo *.c
PKZIP does not allow recursion in directories other
than the current one.) The backslash avoids the
shell filename substitution, so that the name
matching is performed by zip at all directory lev-
els.
Also possible:
-r foo . -i@include.lst
which will only include the files in the current
directory and its subdirectories that match the
patterns in the file include.lst.
-I Don't scan through Image files. This option is
available on Acorn RISC OS only; when used, zip
will not consider Image files (eg. DOS partitions
or Spark archives when SparkFS is loaded) as direc-
tories but will store them as single files.
For example, if you have SparkFS loaded, zipping a
Spark archive will result in a zipfile containing a
directory (and its content) while using the 'I'
option will result in a zipfile containing a Spark
archive. Obviously this second case will also be
obtained (without the 'I' option) if SparkFS isn't
loaded.
-j Store just the name of a saved file (junk the
path), and do not store directory names. By
default, zip will store the full path (relative to
the current path).
-J Strip any prepended data (e.g. a SFX stub) from the
archive.
-k Attempt to convert the names and paths to conform
to MSDOS, store only the MSDOS attribute (just the
user write attribute from UNIX), and mark the entry
as made under MSDOS (even though it was not); for
compatibility with PKUNZIP under MSDOS which cannot
handle certain names such as those with two dots.
-l Translate the Unix end-of-line character LF into
the MSDOS convention CR LF. This option should not
be used on binary files. This option can be used
on Unix if the zip file is intended for PKUNZIP
under MSDOS. If the input files already contain CR
LF, this option adds an extra CR. This ensure that
unzip -a on Unix will get back an exact copy of the
original file, to undo the effect of zip -l.
-ll Translate the MSDOS end-of-line CR LF into Unix LF.